﻿#ifndef USERINFO_H
#define USERINFO_H
#include<QString>
#include <QList>
#include <QMap>

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class UserInfo
{
public:
    UserInfo();
    UserInfo(QString number, QString password,QString role,
             QString sex = "保密", QString name = "",QString birthday = "",
             QString phone = "", QString email = "", QString headPic =  "",
             QString certificate  = "",QString certPath  = "", QString realName  = "");

    const QString &getRole() const;
    const QString &getNumber() const;
    const QString &getPassword() const;
    const QString &getHeadPic() const;
    const QString &getSex() const;
    const QString &getName() const;
    const QString &getRealName() const;
    const QString &getPhone() const;
    const QString &getEmail() const;
    const QString &getBirthday() const;
    const QString &getCertPath() const;
    const QString &getCertificate() const;

    void setRole(const QString& role);
    void setNumber(const QString& number);
    void setPassword(const QString& password);
    void setHeadPic(const QString& path);
    void setSex(const QString& sex);
    void setName(const QString& name);
    void setRealName(const QString& realName);
    void setPhone(const QString& phone);
    void setEmail(const QString& email);
    void setBirthday(const QString& birthday);
    void setCertPath(const QString& certPath);
    void setCertificate(const QString& certificate);

private:
    QString m_role;
    QString m_number;
    QString m_password;
    QString m_headPic;
    QString m_sex;
    QString m_name;
    QString m_realName;
    QString m_phone;
    QString m_email;
    QString m_birthday;
    QString m_certPath;
    QString m_certificate;
};

typedef QList<UserInfo> UserInfoList;
typedef QMap<QString, UserInfoList::iterator> UserInfoMap;  //网络操作使用

#endif // USERINFO_H
